SSF-194 Admin Pantry Management Frontend#164
Conversation
…/github.com/Code-4-Community/ssf into jw/ssf-194-admin-pantry-management-frontend
amywng
left a comment
There was a problem hiding this comment.
small things but lgtm after that!
sam-schu
left a comment
There was a problem hiding this comment.
Further review pending clarification from Priya
| path: ROUTES.TEST_ADMIN_DASHBOARD, | ||
| element: ( | ||
| <ProtectedRoute> | ||
| <TestAdminDashboard /> |
There was a problem hiding this comment.
Why did you change the name here? this is the test admin dashboard, better to keep that clear
There was a problem hiding this comment.
On main this conatiner is exported as just AdminDashboard, did you want me to change that? I also rename it in my admin dashboard pr
There was a problem hiding this comment.
Sorry, got confused looking at the diff
sam-schu
left a comment
There was a problem hiding this comment.
Received partial design clarification - clicking the pantry name should actually navigate to this page (please change PantryApplicationDetails into a component that supports the existing version for application review and this new version). I'm not certain yet where you need to click to access the assign volunteers modal, but for now let's say that anywhere in the assignee column for the pantry row works.
|
|
||
| PANTRY_APPLICATION_DETAILS: '/pantry-application-details/:applicationId', | ||
| PANTRY_APPLICATION_DETAILS: '/pantry-details/application/:applicationId', | ||
| PANTRY_MANAGEMENT_DETAILS: '/pantry-details/pantry/:applicationId', |
There was a problem hiding this comment.
nit: :pantryId might be better for this one?
|
|
||
| export const ASSIGNEE_COLORS = ['yellow.core', 'red', 'teal.ssf', 'blue.ssf']; | ||
|
|
||
| export const USER_ICON_COLORS = ASSIGNEE_COLORS.map((color) => |
There was a problem hiding this comment.
We can actually just combine both of these - there shouldn't be two slightly different sets of assignee/user icon colors, we should be using blue core
| navigate( | ||
| application.type === 'pantry' | ||
| ? `/pantry-application-details/${application.id}` | ||
| ? `/pantry-details/pantry/${application.id}` |
There was a problem hiding this comment.
Can we use the route constants here?
| path: ROUTES.TEST_ADMIN_DASHBOARD, | ||
| element: ( | ||
| <ProtectedRoute> | ||
| <TestAdminDashboard /> |
There was a problem hiding this comment.
Sorry, got confused looking at the diff
| const [pantries, setPantries] = useState<ApprovedPantryResponse[]>([]); | ||
| const [searchPantry, setSearchPantry] = useState(''); | ||
|
|
||
| const [selectedPantries, setSelectedPantries] = useState<string[]>([]); |
There was a problem hiding this comment.
Can we clarify this is for the filter?
| const [selectedPantries, setSelectedPantries] = useState<string[]>([]); | ||
|
|
||
| const [alertState, setAlertMessage] = useAlert(); | ||
| const [submitSuccess, setSubmitSuccess] = useState<boolean>(false); |
There was a problem hiding this comment.
Can we rename this? it looks like it's used for more than just submitting volunteer assignments
|
|
||
| return ( | ||
| <Box flexDirection="column" p={12}> | ||
| <Text textStyle="h1" color="#515151"> |
There was a problem hiding this comment.
Can we use a theme color here?
| boxShadow="sm" | ||
| > | ||
| <VStack align="stretch" gap={8}> | ||
| <Box> |
There was a problem hiding this comment.
This section looks different on the new pantry details page
ℹ️ Issue
Closes https://vidushimisra.atlassian.net/browse/SSF-194
📝 Description
Frontend implementation for admin pantry management: http://localhost:4200/admin-pantry-management
Also implemented assign volunteers modal
✔️ Verification
Verified frontend matched figma design and proper assign volunteer functionality
🏕️ (Optional) Future Work / Notes
The view orders link currently doesn't go to anything, this functionality should be added later.